package iit.projects.etaxi.model.entity;

import java.io.Serializable;
import java.util.Date;

public class Customer implements Serializable {

	private static final long serialVersionUID = -2311371507881545635L;
	
	/**
	 * <p>Primary key of the Customer</p>
	 */
	private Long id;
	
	/**
	 * <p>Unique code of a Customer</p>
	 */
	private String customerCode;
	
	/**
	 * <p>First Name of the Customer</p>
	 */
	private String firstName;
	
	/**
	 * <p>Last Name of the Customer</p>
	 */
	private String lastName;
	
	/**
	 * <p>Residence Address of the Customer</p>
	 */
	private String residenceAddress;
	
	/**
	 * <p>Official Address of the Customer</p>
	 */
	private String officialAddress;
	
	/**
	 * <p>Mobile number of the Customer</p>
	 */
	private String mobileNumber;
	
	/**
	 * <p>Home telephone number of the Customer</p>
	 */
	private String homeNumber;
	
	/**
	 * <p>Customer email address</p>
	 */
	private String email;
	
	/**
	 * <p>Username of the Customer</p>
	 */
	private String userName;
	
	/**
	 * <p>Password </p>
	 */
	private String password;
	
	/**
	 * <p>Gender (Male/Female)</p>
	 */
	private String gender;
	
	/**
	 * <p>Whether the customer is suspended</p>
	 */
	private boolean suspended;
	
	/**
	 * <p>Credit Card Number</p>
	 */
	private Long creditCardNumber;
	
	/**
	 * <p>Card Verification Code Number</p>
	 */
	private Long cvc;
	
	/**
	 * <p>Credit Card Type. Ex: Visa, Master, American Express, etc..</p>
	 */
	private String cardType;
	
	/**
	 * <p>Name on Credit Card</p>
	 */
	private String cardName;
	
	/**
	 * <p>Credit Card Expiry Date</p>
	 */
	private Date expiryDate;
	
	/**
	 * <p>Default Constructor</p>
	 */
	public Customer() {
//		this.gender = "Male";
//		this.cardType = "Visa";
	}
	
	/**
	 * <p>Copy Constructor</p>
	 */
	public Customer(Customer customer) {
		this.id = customer.id;
		this.customerCode = customer.customerCode;
		this.firstName = customer.firstName;
		this.lastName = customer.lastName;
		this.gender = customer.gender;
		this.residenceAddress = customer.residenceAddress;
		this.officialAddress = customer.officialAddress;
		this.mobileNumber = customer.mobileNumber;
		this.homeNumber = customer.homeNumber;
		this.email = customer.email;
		this.userName = customer.userName;
		this.password = customer.password;
		this.creditCardNumber = customer.creditCardNumber;
		this.cvc = customer.cvc;
		this.expiryDate = customer.expiryDate;
		this.cardName = customer.cardName;
		this.cardType = customer.cardType;
		this.suspended = customer.suspended;
	}
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCustomerCode() {
		return customerCode;
	}

	public void setCustomerCode(String customerCode) {
		this.customerCode = customerCode;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getResidenceAddress() {
		return residenceAddress;
	}

	public void setResidenceAddress(String residenceAddress) {
		this.residenceAddress = residenceAddress;
	}

	public String getOfficialAddress() {
		return officialAddress;
	}

	public void setOfficialAddress(String officialAddress) {
		this.officialAddress = officialAddress;
	}

	public String getMobileNumber() {
		return mobileNumber;
	}

	public void setMobileNumber(String mobileNumber) {
		this.mobileNumber = mobileNumber;
	}

	public String getHomeNumber() {
		return homeNumber;
	}

	public void setHomeNumber(String homeNumber) {
		this.homeNumber = homeNumber;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public boolean isSuspended() {
		return suspended;
	}

	public void setSuspended(boolean suspended) {
		this.suspended = suspended;
	}

	public Long getCreditCardNumber() {
		return creditCardNumber;
	}

	public void setCreditCardNumber(Long creditCardNumber) {
		this.creditCardNumber = creditCardNumber;
	}

	public Long getCvc() {
		return cvc;
	}

	public void setCvc(Long cvc) {
		this.cvc = cvc;
	}

	public String getCardType() {
		return cardType;
	}

	public void setCardType(String cardType) {
		this.cardType = cardType;
	}

	public String getCardName() {
		return cardName;
	}

	public void setCardName(String cardName) {
		this.cardName = cardName;
	}

	public Date getExpiryDate() {
		return expiryDate;
	}

	public void setExpiryDate(Date expiryDate) {
		this.expiryDate = expiryDate;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Customer other = (Customer) obj;
		if (getId() == null) {
			if (other.getId() != null)
				return false;
		} else if (!getId().equals(other.getId()))
			return false;
		return true;
	}

}
